<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="../vue.js"></script>
    <title>Document</title>
</head>

<body>

    <div id="hy">
        <!-- v-show:(布尔值) -->
        <!-- v-if(v-else-if)(v-else):(布尔值) :条件渲染,上者是隐藏,下着是直接不加入-->
        <h2 v-show="true">{{name}}</h2>
        <button @click="n++">{{n}}</button>

        <!-- <div v-if="n === 2 ? true : false">aaa</div>
        <div v-else-if="n===4?ture:false">ddd</div>
        <div v-else-if="n === 1 ? true : false">bb</div>
        <div v-if="n === 2?true:false">ddd</div>
        <div v-else>ccc</div> -->
        
    </div>


    <script>
        const vm = new Vue({
            el: '#hy',
            data: {
                name: "hyy",
                n: 0
            }
        })
    </script>
</body>

</html>